#!/bin/bash
script_dir=$(cd "$(dirname "$0")"; pwd)
build_dir=$script_dir/deploy

build_type=$1
if [ -z "$build_type" ]; then
    build_type="Release"
fi

if [ -z "${DTK_SDK_DIR}"] ; then 
    export DTK_SDK_DIR=/home/jason/tools/datakit
fi

rm -rf ${build_dir}
bash setup.sh $build_type

cmake -DCMAKE_BUILD_TYPE:STRING=$build_type  -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DInterOp=on -DAMXStorage=on -DAMCAXObj=on  --no-warn-unused-cli -S$script_dir -B$build_dir

cmake  --build $build_dir --config $build_dir  -j20 
cmake  --install $build_dir  --strip --config $build_dir


